#ifndef SERVICECLIENT_H
#define SERVICECLIENT_H

#include <QTcpSocket>

#include "client.h"

class ServiceClient : public Client
{
    Q_OBJECT

public:
    ServiceClient(QTcpSocket *socket, QObject *parent = 0);

    void send(QByteArray data);

private Q_SLOTS:
    void processIncomingData();

Q_SIGNALS:
    void dataReceived(QByteArray);

protected:
    enum State{
        Closed,
        Handshake,
        Opened
    };

    QByteArray v_lastUnprocessedData;

    State v_state;

};

#endif // SERVICECLIENT_H
